|
|
|
|
|
|
|
Figure 11.9.
Displaying the graph in both Visual Basic and Microsoft Paint. |
|
|
|
|
|
|
|
|
Creating Your Data Graph OLE Server |
|
|
|
|
|
|
|
|
Now that you have learned the basic techniques of using the graph control, you are ready to build your database graph OLE Server. This OLE Server consists of a single form that contains a graph control and a menu of graphing options. It also has methods that load the form, set the graphing values using your dataset, and display the results. You can pass any valid Visual Basic Recordset object to the data graph OLE Server and display any single-set, multipoint dataset without any further modification of the code. |
|
|
|
|
|
|
|
|
Building the Data Graph Form |
|
|
|
|
|
|
|
|
First, start a new ActiveX DLL Visual Basic project. Set the name of the project to prjDataGraph and the name of the default class module to DataGraph. Add a form to the project and set its Name property to frmGraph. You also need to make sure you load the Pinnacle-BPS graph control (GRAPH32.OCX) and the Microsoft common dialog control to the project. |
|
|
|
|
| |
|
|
|
|
Make sure the Pinnacle-BPS graph control is in your Visual Basic toolbox. If not, refer back to the "Loading the Graph Control into the Visual Basic Toolbox" section for instructions on how to add it to your project's toolbox. |
|
|
|
|
|
|
|